#include "func_pwd.h"

void func_pwd(int peerfd) {
    char buff[1024];
    char *pathname = getcwd(buff, sizeof(buff));
    if(NULL == pathname) {
        char err[40] = "Error:pwd ran with an error!";
        send(peerfd, err, sizeof(err), 0);
        exit(1);
    }
    else {
        send(peerfd, buff, strlen(buff), 0);
    }
}


